/*
 * $Id: Year2000FixerGenerator.java,v 1.2 2009/07/10 19:53:23 navdeep_mahajan Exp $
 * 
 * Copyright (C) 2008 General Electric Company. All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of the General
 * Electric Company (GE). You shall not disclose this software and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with GE.
 * 
 * GE MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 * NON-INFRINGEMENT. GE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 * AS A RESULT OF USING, MODIFYING, OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES.
 */
package com.ge.healthcare.autosc.processor.magmon.y2k;

import com.ge.healthcare.autosc.processor.exception.Y2KFixerGeneratorException;

public class Year2000FixerGenerator {

	public static Year2000Fixer getYear2000Fixer(String fixerClassName) 
		throws Y2KFixerGeneratorException{
		Year2000Fixer fixer = null;
		try
        {
            Class<?> fixerClass = Class.forName( fixerClassName );
            fixer = (Year2000Fixer) fixerClass.newInstance();
        } catch (ClassNotFoundException cnfe) {
        	throw new Y2KFixerGeneratorException("Class not found with class name: " + fixerClassName, cnfe);
        } catch (IllegalAccessException iae) {
        	throw new Y2KFixerGeneratorException("Illegal access to class with class name: " + fixerClassName, iae);
        } catch (InstantiationException ie) {
        	throw new Y2KFixerGeneratorException("Instantiation error for class name: " + fixerClassName, ie);
        }
        return fixer;
	}
}
